﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Services;

namespace Dala.Samples.Highchart
{
    public partial class barchart : System.Web.UI.Page
    {
        public class ChartData
        {
            public string Type { get; set; }
            public int Percentage { get; set; }
        }
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        [WebMethod]
        public static List<ChartData> GetChartData()
        {
            ChartData[] chartDatas = new ChartData[]
                {  
                    new ChartData { Type = "Male", Percentage = 50},
                    new ChartData { Type = "Female", Percentage = 30},
                    new ChartData { Type = "Not-Defined", Percentage = 20}
                    };
            return chartDatas.ToList();
        }
    }
}